﻿{
	"ProcessTemplates": [
		{
			"Name": "CSV file from SFTP server to Microsoft SQL database update",
			"Modified": "2024-05-08T08:50:48.9633998",
			"Modifier": "jefim.borissov@frends.com",
			"Tags": [
				"SFTP",
				"CSV",
				"MicrosoftSQL"
			],
			"TemplateProcessTags": [],
			"Description": "This process will retrieve a **CSV file** from the specified **SFTP** server.\nIt will take the contents of the file and use it to  create an **MicrosoftSQL Database** update statement. It will then execute the statement on the specified **MicrosoftSQL  Database**",
			"Version": 1,
			"UniqueIdentifier": "f6607539-faef-4efb-bf5d-bce77a54158a",
			"ProcessVariablesJson": "{\"FilePath\":{\"Value\":\"\\\"/\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Path to CSV input data file.\"},\"FileName\":{\"Value\":\"\\\"example.csv\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Name of CSV input data file.\"},\"ServerAddress\":{\"Value\":\"\\\"127.0.0.1\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server address\"},\"ServerUser\":{\"Value\":\"\\\"user\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server user.\"},\"ServerPassword\":{\"Value\":\"\\\"password\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"SFTP server user's password.\"},\"ConnectionString\":{\"Value\":\"\\\"commentionstring\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"Database connection string.\"},\"RowIndentifier\":{\"Value\":\"\\\"email\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Column name in dthe database that identifies individual rows.\"},\"TableName\":{\"Value\":\"\\\"table\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Name of database table to be updated\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "CSV file from SFTP server to Microsoft SQL database update",
					"Modified": "2024-05-08T08:50:48.9633998",
					"Modifier": "jefim.borissov@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This process will retrieve a **CSV file** from the specified **SFTP** server.\nIt will take the contents of the file and use it to  create an **MicrosoftSQL Database** update statement. It will then execute the statement on the specified **MicrosoftSQL  Database**",
					"Version": 1,
					"UniqueIdentifier": "4f860ecb-63c4-4097-969a-7652acc068da",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual Trigger\"><bpmn2:outgoing>Flow_0pdno6e</bpmn2:outgoing></bpmn2:startEvent><bpmn2:sequenceFlow id=\"Flow_0pdno6e\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1t3j2vx\" /><bpmn2:task id=\"Activity_1t3j2vx\" name=\"Read CSV file\"><bpmn2:incoming>Flow_0pdno6e</bpmn2:incoming><bpmn2:outgoing>Flow_0hrntp0</bpmn2:outgoing><bpmn2:property id=\"Property_1qc75f2\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_17r5rlk\"><bpmn2:sourceRef>DataObjectReference_0ksp4rn</bpmn2:sourceRef><bpmn2:targetRef>Property_1qc75f2</bpmn2:targetRef></bpmn2:dataInputAssociation><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0hrntp0\" sourceRef=\"Activity_1t3j2vx\" targetRef=\"Gateway_14nb58k\" /><bpmn2:exclusiveGateway id=\"Gateway_14nb58k\" name=\"File read successful?\" default=\"Flow_0dj9rel\"><bpmn2:incoming>Flow_0hrntp0</bpmn2:incoming><bpmn2:outgoing>Flow_0ae0vze</bpmn2:outgoing><bpmn2:outgoing>Flow_0dj9rel</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:dataObjectReference id=\"DataObjectReference_0ksp4rn\" name=\"CSV  File\" dataObjectRef=\"DataObject_1mqe5m5\" /><bpmn2:dataObject id=\"DataObject_1mqe5m5\" /><bpmn2:sequenceFlow id=\"Flow_0ae0vze\" name=\"yes\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Activity_1gzshbf\" /><bpmn2:endEvent id=\"Event_1iedv3k\"><bpmn2:incoming>Flow_0auey22</bpmn2:incoming></bpmn2:endEvent><bpmn2:task id=\"Activity_1gzshbf\" name=\"Convert CSV to JSON\"><bpmn2:incoming>Flow_0ae0vze</bpmn2:incoming><bpmn2:outgoing>Flow_0q6ugwp</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0auey22\" name=\"yes\" sourceRef=\"Gateway_1cfy5qs\" targetRef=\"Event_1iedv3k\" /><bpmn2:scriptTask id=\"Activity_1mnaiqp\" name=\"Create UPDATE statement\"><bpmn2:incoming>Flow_0q6ugwp</bpmn2:incoming><bpmn2:outgoing>Flow_18qzmuc</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:task id=\"Activity_0hqwryq\" name=\"Execute batch UPDATE\"><bpmn2:incoming>Flow_18qzmuc</bpmn2:incoming><bpmn2:outgoing>Flow_0i8knm8</bpmn2:outgoing><bpmn2:property id=\"Property_1nkqgau\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_0m6984z\"><bpmn2:sourceRef>DataStoreReference_19cl489</bpmn2:sourceRef><bpmn2:targetRef>Property_1nkqgau</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_18qzmuc\" sourceRef=\"Activity_1mnaiqp\" targetRef=\"Activity_0hqwryq\" /><bpmn2:dataStoreReference id=\"DataStoreReference_19cl489\" name=\"Database\" /><bpmn2:exclusiveGateway id=\"Gateway_1cfy5qs\" name=\"Database update successful?\" default=\"Flow_1opj52d\"><bpmn2:incoming>Flow_0i8knm8</bpmn2:incoming><bpmn2:outgoing>Flow_0auey22</bpmn2:outgoing><bpmn2:outgoing>Flow_1opj52d</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_0i8knm8\" sourceRef=\"Activity_0hqwryq\" targetRef=\"Gateway_1cfy5qs\" /><bpmn2:sequenceFlow id=\"Flow_0q6ugwp\" sourceRef=\"Activity_1gzshbf\" targetRef=\"Activity_1mnaiqp\" /><bpmn2:intermediateThrowEvent id=\"Event_0o1xvss\" name=\"Throw an error if the file is empty\"><bpmn2:incoming>Flow_0dj9rel</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0dj9rel\" name=\"no\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Event_0o1xvss\" /><bpmn2:intermediateThrowEvent id=\"Event_15nrooi\" name=\"Throw an error in case the update operations failed\"><bpmn2:incoming>Flow_1opj52d</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_1opj52d\" name=\"no\" sourceRef=\"Gateway_1cfy5qs\" targetRef=\"Event_15nrooi\" /><bpmn2:group id=\"Group_1m3lbwj\" categoryValueRef=\"CategoryValue_1rk699b\" /><bpmn2:textAnnotation id=\"TextAnnotation_0lqwta1\"><bpmn2:text>Code will create the Update statement based on the Column Names from the input file.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_1k82moa\" sourceRef=\"Activity_1mnaiqp\" targetRef=\"TextAnnotation_0lqwta1\" /><bpmn2:group id=\"Group_1ffd0rr\" categoryValueRef=\"CategoryValue_067e4pq\" /></bpmn2:process><bpmn2:category id=\"Category_1y62c6d\"><bpmn2:categoryValue id=\"CategoryValue_1rk699b\" value=\"Update the database\" /></bpmn2:category><bpmn2:category id=\"Category_1ybjyvd\"><bpmn2:categoryValue id=\"CategoryValue_067e4pq\" value=\"Handle input file\" /></bpmn2:category><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"BPMNShape_190lrq6\" bpmnElement=\"TextAnnotation_0lqwta1\"><dc:Bounds x=\"880\" y=\"350\" width=\"140\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1t3j2vx_di\" bpmnElement=\"Activity_1t3j2vx\"><dc:Bounds x=\"380\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_14nb58k_di\" bpmnElement=\"Gateway_14nb58k\" isMarkerVisible=\"true\"><dc:Bounds x=\"535\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"531\" y=\"196\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_06rsf7n\" bpmnElement=\"Activity_1mnaiqp\"><dc:Bounds x=\"880\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_0ksp4rn_di\" bpmnElement=\"DataObjectReference_0ksp4rn\"><dc:Bounds x=\"412\" y=\"365\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"407\" y=\"422\" width=\"47\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0o1xvss_di\" bpmnElement=\"Event_0o1xvss\"><dc:Bounds x=\"542\" y=\"372\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"520\" y=\"415\" width=\"81\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1gzshbf_di\" bpmnElement=\"Activity_1gzshbf\"><dc:Bounds x=\"650\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"262\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"244\" y=\"276\" width=\"75\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1iedv3k_di\" bpmnElement=\"Event_1iedv3k\"><dc:Bounds x=\"1372\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0hqwryq_di\" bpmnElement=\"Activity_0hqwryq\"><dc:Bounds x=\"1050\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_0mub7d9\" bpmnElement=\"Gateway_1cfy5qs\" isMarkerVisible=\"true\"><dc:Bounds x=\"1225\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1211\" y=\"196\" width=\"84\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_19cl489_di\" bpmnElement=\"DataStoreReference_19cl489\"><dc:Bounds x=\"1075\" y=\"361\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1076\" y=\"418\" width=\"48\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_15nrooi_di\" bpmnElement=\"Event_15nrooi\"><dc:Bounds x=\"1232\" y=\"372\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1209\" y=\"415\" width=\"83\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"BPMNEdge_01be9ag\" bpmnElement=\"Association_1k82moa\"><di:waypoint x=\"928\" y=\"298\" /><di:waypoint x=\"928\" y=\"350\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataInputAssociation_0m6984z_di\" bpmnElement=\"DataInputAssociation_0m6984z\"><di:waypoint x=\"1100\" y=\"361\" /><di:waypoint x=\"1100\" y=\"298\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0dj9rel_di\" bpmnElement=\"Flow_0dj9rel\"><di:waypoint x=\"560\" y=\"283\" /><di:waypoint x=\"560\" y=\"372\" /><bpmndi:BPMNLabel><dc:Bounds x=\"569\" y=\"324\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1opj52d_di\" bpmnElement=\"Flow_1opj52d\"><di:waypoint x=\"1250\" y=\"283\" /><di:waypoint x=\"1250\" y=\"372\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1259\" y=\"325\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Group_1m3lbwj_di\" bpmnElement=\"Group_1m3lbwj\"><dc:Bounds x=\"850\" y=\"110\" width=\"480\" height=\"370\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1065\" y=\"117\" width=\"54\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_13sx5ix\" bpmnElement=\"Group_1ffd0rr\"><dc:Bounds x=\"340\" y=\"110\" width=\"450\" height=\"370\" /><bpmndi:BPMNLabel><dc:Bounds x=\"528\" y=\"117\" width=\"79\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_0pdno6e_di\" bpmnElement=\"Flow_0pdno6e\"><di:waypoint x=\"298\" y=\"258\" /><di:waypoint x=\"380\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataInputAssociation_17r5rlk_di\" bpmnElement=\"DataInputAssociation_17r5rlk\"><di:waypoint x=\"431\" y=\"365\" /><di:waypoint x=\"430\" y=\"298\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0hrntp0_di\" bpmnElement=\"Flow_0hrntp0\"><di:waypoint x=\"480\" y=\"258\" /><di:waypoint x=\"535\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0ae0vze_di\" bpmnElement=\"Flow_0ae0vze\"><di:waypoint x=\"585\" y=\"258\" /><di:waypoint x=\"650\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"595\" y=\"233\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0auey22_di\" bpmnElement=\"Flow_0auey22\"><di:waypoint x=\"1275\" y=\"258\" /><di:waypoint x=\"1372\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1301\" y=\"266\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_18qzmuc_di\" bpmnElement=\"Flow_18qzmuc\"><di:waypoint x=\"980\" y=\"258\" /><di:waypoint x=\"1050\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0i8knm8_di\" bpmnElement=\"Flow_0i8knm8\"><di:waypoint x=\"1150\" y=\"258\" /><di:waypoint x=\"1225\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0q6ugwp_di\" bpmnElement=\"Flow_0q6ugwp\"><di:waypoint x=\"750\" y=\"258\" /><di:waypoint x=\"880\" y=\"258\" /></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual Trigger\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1t3j2vx\",\"Type\":1,\"Parameters\":{\"input\":{\"Path\":{\"mode\":\"text\",\"value\":\"{{#var.FilePath}}{{#var.FileName}}\"},\"FileEncoding\":{\"mode\":\"select\",\"value\":\"ANSI\"},\"EnableBom\":{\"mode\":\"toggle\",\"value\":false},\"EncodingInString\":{\"mode\":\"text\",\"value\":\"\"}},\"connection\":{\"ConnectionTimeout\":{\"mode\":\"integer\",\"value\":60},\"Address\":{\"mode\":\"csharp\",\"value\":\"#var.ServerAddress\"},\"Port\":{\"mode\":\"integer\",\"value\":22},\"Authentication\":{\"mode\":\"select\",\"value\":\"UsernamePassword\"},\"Username\":{\"mode\":\"csharp\",\"value\":\"#var.ServerUser\"},\"Password\":{\"mode\":\"csharp\",\"value\":\"#var.ServerPassword\"},\"PrivateKeyFile\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyString\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyPassphrase\":{\"mode\":\"text\",\"value\":\"\"},\"ServerFingerPrint\":{\"mode\":\"text\",\"value\":\"\"},\"HostKeyAlgorithm\":{\"mode\":\"select\",\"value\":\"Any\"},\"UseKeyboardInteractiveAuthentication\":{\"mode\":\"toggle\",\"value\":false},\"PromptAndResponse\":[],\"BufferSize\":{\"mode\":\"integer\",\"value\":32}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/7fe311ed-3e37-4669-8c6b-9e5792e996d0/v1\",\"PromoteResultAs\":null,\"Name\":\"Read CSV file\",\"Description\":\"\",\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_14nb58k\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"!String.IsNullOrEmpty(#result[Read CSV file].Content)\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"File read successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_0ksp4rn\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"CSV  File\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_19cl489\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Database\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0ae0vze\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1iedv3k\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"{{#result[Execute batch UPDATE].RecordsAffected}} data rows were updated in {{#var.TableName}}.\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1gzshbf\",\"Type\":1,\"Parameters\":{\"input\":{\"Csv\":{\"mode\":\"csharp\",\"value\":\"#result[Read CSV file].Content\"},\"Delimiter\":{\"mode\":\"text\",\"value\":\";\"},\"ColumnSpecifications\":[]},\"options\":{\"ContainsHeaderRow\":{\"mode\":\"toggle\",\"value\":true},\"TrimOutput\":{\"mode\":\"toggle\",\"value\":true},\"SkipRowsFromTop\":{\"mode\":\"integer\",\"value\":0},\"SkipEmptyRows\":{\"mode\":\"toggle\",\"value\":true},\"ReplaceHeaderWhitespaceWith\":{\"mode\":\"text\",\"value\":\" \"},\"CultureInfo\":{\"mode\":\"text\",\"value\":\"\"},\"TreatMissingFieldsAsNulls\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/51dc8716-78a6-40a1-a803-6be8e355cb79/v1\",\"PromoteResultAs\":null,\"Name\":\"Convert CSV to JSON\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1mnaiqp\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    JArray arr = JArray.FromObject(#result[Convert CSV to JSON].Json);\\n\\n    string setClause = \\\"\\\";\\n    foreach(JProperty a in (JToken)arr[0])\\n    {\\n        if(a.Name == #var.RowIndentifier) continue;\\n\\n        setClause += $\\\"{a.Name} = @{a.Name}, \\\";\\n    }\\n            \\n    setClause = setClause.Remove(setClause.Length-2);\\n\\n    return $\\\"UPDATE {#var.TableName} SET {setClause}  WHERE {#var.RowIndentifier} = @{#var.RowIndentifier}\\\";\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"updStmt\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create UPDATE statement\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0hqwryq\",\"Type\":1,\"Parameters\":{\"input\":{\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.ConnectionString\"},\"Query\":{\"mode\":\"csharp\",\"value\":\"#var.updStmt\"},\"InputJson\":{\"mode\":\"csharp\",\"value\":\"#result[Convert CSV to JSON].Json.ToString()\"}},\"options\":{\"ThrowErrorOnFailure\":{\"mode\":\"toggle\",\"value\":true},\"CommandTimeoutSeconds\":{\"mode\":\"integer\",\"value\":60},\"SqlTransactionIsolationLevel\":{\"mode\":\"select\",\"value\":\"ReadCommitted\"}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/a5f1ccbf-8213-4589-81a0-1a1e6d37af60/v1\",\"PromoteResultAs\":null,\"Name\":\"Execute batch UPDATE\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1cfy5qs\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Execute batch UPDATE].Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Database update successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0auey22\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0o1xvss\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occured reading the input file {{#var.FileName}} from SFTP server {{#var.ServerAddress}}\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0dj9rel\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_15nrooi\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occured updating the database table {{#var.TableName}}: {{#result[Execute batch UPDATE].ErrorMessage}}\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1opj52d\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual Trigger\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/7FE311ED-3E37-4669-8C6B-9E5792E996D0/v1\",\"/ProcessTask/51DC8716-78A6-40A1-A803-6BE8E355CB79/v1\",\"/ProcessTask/A5F1CCBF-8213-4589-81A0-1A1E6D37AF60/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.2.1685",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 0,
					"MinorVersion": 1,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"4f860ecb-63c4-4097-969a-7652acc068da": [
						{
							"Id": "7fe311ed-3e37-4669-8c6b-9e5792e996d0",
							"PackageId": "Frends.SFTP.ReadFile",
							"PackageVersion": "2.1.0",
							"Name": "Frends.SFTP.ReadFile.SFTP.ReadFile(Input, Connection, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "51dc8716-78a6-40a1-a803-6be8e355cb79",
							"PackageId": "Frends.CSV.ConvertToJSON",
							"PackageVersion": "1.0.0",
							"Name": "Frends.CSV.ConvertToJSON.CSV.ConvertToJSON(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "a5f1ccbf-8213-4589-81a0-1a1e6d37af60",
							"PackageId": "Frends.MicrosoftSQL.BatchOperation",
							"PackageVersion": "1.0.0",
							"Name": "Frends.MicrosoftSQL.BatchOperation.MicrosoftSQL.BatchOperation(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}